using System;
using System.Collections.Generic;
using System.Xml.Linq;
using Facebook;

namespace Facebook.Api
{
    [FacebookObjectAttribute("session_info")]
    public class SessionInfo : FacebookObjectBase
    {
        public SessionInfo(XElement content) : base(content) { }

        public SessionInfo(IDictionary<String, Object> dict) : base(dict) { }

        public SessionInfo() { }

        public String SessionKey
        {
            get { return this.GetString("session_key"); }
            set { this.InnerDictionary["session_key"] = value; }
        }

        public Int64 Uid
        {
            get { return this.GetValueType<Int64>("uid"); }
            set { this.InnerDictionary["uid"] = value; }
        }

        public DateTime Expires
        {
            get { return new DateTime(this.GetValueType<Int64>("expires")); }
            set { this.InnerDictionary["expires"] = value.Ticks; }
        }

        public String Secret
        {
            get{ return this.GetString("secret");}
            set { this.InnerDictionary["secret"] = value; }
        }

        public String BaseDomain
        {
            get { return this.GetString("base_domain"); }
            set { this.InnerDictionary["base_domain"] = value; }
        }
    }
}